import React, {Component} from 'react';
import {
    View,
    StyleSheet,
    Text,
    AsyncStorage,
    Button,
    StatusBar
} from 'react-native';

export default class OtherScreen extends Component {
    static navigationOptions = {
        title: '',
        // header:null
    };

    render() {
        return (
            <View style={styles.container}>
                <Text>OtherScreen:{new Date().getTime()}</Text>
                {/*<Button title="跳转到首页" onPress={this._showMoreApp} style={{marginVertical:5}}/>*/}
                {/*<Button title="跳转到其它" onPress={this._showMapApp} style={{marginVertical:5}}/>*/}
                {/*<Button title="注销" onPress={this._signOutAsync} style={{marginVertical:5}}/>*/}
                {/*<StatusBar barStyle="default" />*/}
            </View>
        );
    }

    _showMoreApp = () => {
        this.props.navigation.navigate('Home');
    };

    _showMapApp = () => {
        this.props.navigation.navigate('Map');
    };

    _signOutAsync = async () => {
        await AsyncStorage.clear();
        this.props.navigation.navigate('Auth');
    };
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        alignItems: 'center',
        justifyContent: 'center',
    },
});